
import { defineComponent } from 'vue';
import styles from '@/main/index.module.scss';
import { _nonEmpty } from '@/main/js/utils';
import { terminalViewerProps } from '@/main/js/terminalAttribute';

export default defineComponent({
  props: terminalViewerProps(),
  setup(props) {
    return () => (
      <span class={styles.tContentNormal}>
        {_nonEmpty(props.data.tag === null ? props.data.class : props.data.tag) && (
          <span class={styles[props.data.class]} style='margin-right: 10px'>
            {props.data.tag === null ? props.data.class : props.data.tag}
          </span>
        )}
        <span domPropsInnerHTML={props.data.content}></span>
      </span>
    )
  }
})
